3.1.1 \(\int x^5 (a+b \sin (c+d x^2)) \, dx\) [1]

Optimal. Leaf size=57 \[ \frac {a x^6}{6}+\frac {b \cos \left (c+d x^2\right )}{d^3}-\frac {b x^4 \cos \left (c+d x^2\right )}{2 d}+\frac {b x^2 \sin \left (c+d x^2\right )}{d^2} \]

[Out]

1/6*a*x^6+b*cos(d*x^2+c)/d^3-1/2*b*x^4*cos(d*x^2+c)/d+b*x^2*sin(d*x^2+c)/d^2

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {14, 3460, 3377, 2718} \begin {gather*} \frac {a x^6}{6}+\frac {b \cos \left (c+d x^2\right )}{d^3}+\frac {b x^2 \sin \left (c+d x^2\right )}{d^2}-\frac {b x^4 \cos \left (c+d x^2\right )}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^5*(a + b*Sin[c + d*x^2]),x]

[Out]

(a*x^6)/6 + (b*Cos[c + d*x^2])/d^3 - (b*x^4*Cos[c + d*x^2])/(2*d) + (b*x^2*Sin[c + d*x^2])/d^2

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3460

Int[(x_)^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sin[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rubi steps

\begin {align*} \int x^5 \left (a+b \sin \left (c+d x^2\right )\right ) \, dx &=\int \left (a x^5+b x^5 \sin \left (c+d x^2\right )\right ) \, dx\\ &=\frac {a x^6}{6}+b \int x^5 \sin \left (c+d x^2\right ) \, dx\\ &=\frac {a x^6}{6}+\frac {1}{2} b \text {Subst}\left (\int x^2 \sin (c+d x) \, dx,x,x^2\right )\\ &=\frac {a x^6}{6}-\frac {b x^4 \cos \left (c+d x^2\right )}{2 d}+\frac {b \text {Subst}\left (\int x \cos (c+d x) \, dx,x,x^2\right )}{d}\\ &=\frac {a x^6}{6}-\frac {b x^4 \cos \left (c+d x^2\right )}{2 d}+\frac {b x^2 \sin \left (c+d x^2\right )}{d^2}-\frac {b \text {Subst}\left (\int \sin (c+d x) \, dx,x,x^2\right )}{d^2}\\ &=\frac {a x^6}{6}+\frac {b \cos \left (c+d x^2\right )}{d^3}-\frac {b x^4 \cos \left (c+d x^2\right )}{2 d}+\frac {b x^2 \sin \left (c+d x^2\right )}{d^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 51, normalized size = 0.89 \begin {gather*} \frac {a d^3 x^6-3 b \left (-2+d^2 x^4\right ) \cos \left (c+d x^2\right )+6 b d x^2 \sin \left (c+d x^2\right )}{6 d^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^5*(a + b*Sin[c + d*x^2]),x]

[Out]

(a*d^3*x^6 - 3*b*(-2 + d^2*x^4)*Cos[c + d*x^2] + 6*b*d*x^2*Sin[c + d*x^2])/(6*d^3)

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 62, normalized size = 1.09

method result size
risch \(\frac {a \,x^{6}}{6}-\frac {b \left (x^{4} d^{2}-2\right ) \cos \left (d \,x^{2}+c \right )}{2 d^{3}}+\frac {b \,x^{2} \sin \left (d \,x^{2}+c \right )}{d^{2}}\) \(47\)
default \(\frac {a \,x^{6}}{6}+b \left (-\frac {x^{4} \cos \left (d \,x^{2}+c \right )}{2 d}+\frac {\frac {x^{2} \sin \left (d \,x^{2}+c \right )}{d}+\frac {\cos \left (d \,x^{2}+c \right )}{d^{2}}}{d}\right )\) \(62\)
norman \(\frac {\frac {2 b}{d^{3}}+\frac {a \,x^{6}}{6}+\frac {a \,x^{6} \left (\tan ^{2}\left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )\right )}{6}-\frac {b \,x^{4}}{2 d}+\frac {2 b \,x^{2} \tan \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )}{d^{2}}+\frac {b \,x^{4} \left (\tan ^{2}\left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )\right )}{2 d}}{1+\tan ^{2}\left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )}\) \(102\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^5*(a+b*sin(d*x^2+c)),x,method=_RETURNVERBOSE)

[Out]

1/6*a*x^6+b*(-1/2/d*x^4*cos(d*x^2+c)+2/d*(1/2/d*x^2*sin(d*x^2+c)+1/2/d^2*cos(d*x^2+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 47, normalized size = 0.82 \begin {gather*} \frac {1}{6} \, a x^{6} + \frac {{\left (2 \, d x^{2} \sin \left (d x^{2} + c\right ) - {\left (d^{2} x^{4} - 2\right )} \cos \left (d x^{2} + c\right )\right )} b}{2 \, d^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^5*(a+b*sin(d*x^2+c)),x, algorithm="maxima")

[Out]

1/6*a*x^6 + 1/2*(2*d*x^2*sin(d*x^2 + c) - (d^2*x^4 - 2)*cos(d*x^2 + c))*b/d^3

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 51, normalized size = 0.89 \begin {gather*} \frac {a d^{3} x^{6} + 6 \, b d x^{2} \sin \left (d x^{2} + c\right ) - 3 \, {\left (b d^{2} x^{4} - 2 \, b\right )} \cos \left (d x^{2} + c\right )}{6 \, d^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^5*(a+b*sin(d*x^2+c)),x, algorithm="fricas")

[Out]

1/6*(a*d^3*x^6 + 6*b*d*x^2*sin(d*x^2 + c) - 3*(b*d^2*x^4 - 2*b)*cos(d*x^2 + c))/d^3

________________________________________________________________________________________

Sympy [A]
time = 0.40, size = 65, normalized size = 1.14 \begin {gather*} \begin {cases} \frac {a x^{6}}{6} - \frac {b x^{4} \cos {\left (c + d x^{2} \right )}}{2 d} + \frac {b x^{2} \sin {\left (c + d x^{2} \right )}}{d^{2}} + \frac {b \cos {\left (c + d x^{2} \right )}}{d^{3}} & \text {for}\: d \neq 0 \\\frac {x^{6} \left (a + b \sin {\left (c \right )}\right )}{6} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**5*(a+b*sin(d*x**2+c)),x)

[Out]

Piecewise((a*x**6/6 - b*x**4*cos(c + d*x**2)/(2*d) + b*x**2*sin(c + d*x**2)/d**2 + b*cos(c + d*x**2)/d**3, Ne(
d, 0)), (x**6*(a + b*sin(c))/6, True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 128 vs. \(2 (53) = 106\).
time = 3.68, size = 128, normalized size = 2.25 \begin {gather*} -\frac {{\left ({\left (d x^{2} + c\right )}^{2} b - 2 \, {\left (d x^{2} + c\right )} b c - 2 \, b\right )} \cos \left (d x^{2} + c\right )}{2 \, d^{3}} + \frac {{\left ({\left (d x^{2} + c\right )} b - b c\right )} \sin \left (d x^{2} + c\right )}{d^{3}} + \frac {{\left (d x^{2} + c\right )}^{3} a - 3 \, {\left (d x^{2} + c\right )}^{2} a c}{6 \, d^{3}} + \frac {{\left (d x^{2} + c\right )} a c^{2} - b c^{2} \cos \left (d x^{2} + c\right )}{2 \, d^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^5*(a+b*sin(d*x^2+c)),x, algorithm="giac")

[Out]

-1/2*((d*x^2 + c)^2*b - 2*(d*x^2 + c)*b*c - 2*b)*cos(d*x^2 + c)/d^3 + ((d*x^2 + c)*b - b*c)*sin(d*x^2 + c)/d^3
 + 1/6*((d*x^2 + c)^3*a - 3*(d*x^2 + c)^2*a*c)/d^3 + 1/2*((d*x^2 + c)*a*c^2 - b*c^2*cos(d*x^2 + c))/d^3

________________________________________________________________________________________

Mupad [B]
time = 0.19, size = 53, normalized size = 0.93 \begin {gather*} \frac {a\,x^6}{6}+\frac {b\,\cos \left (d\,x^2+c\right )-\frac {b\,d^2\,x^4\,\cos \left (d\,x^2+c\right )}{2}+b\,d\,x^2\,\sin \left (d\,x^2+c\right )}{d^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^5*(a + b*sin(c + d*x^2)),x)

[Out]

(a*x^6)/6 + (b*cos(c + d*x^2) - (b*d^2*x^4*cos(c + d*x^2))/2 + b*d*x^2*sin(c + d*x^2))/d^3

________________________________________________________________________________________